package reflect;

import java.io.FileReader;
import java.lang.reflect.Method;
import java.util.Properties;

public class GenerateClassByReflect {
    public static void main(String[] args)throws Exception {
        Properties properties = new Properties();
        properties.load(new FileReader("D:\\Data\\ideaData\\src\\reflect\\class.txt"));
        String className = properties.getProperty("className");
        String methodName = properties.getProperty("methodName");
        Class<?> aClass = Class.forName(className);
        Method method = aClass.getMethod(methodName);
        method.invoke(aClass.newInstance());

    }
}
